import { createRouter, createWebHashHistory } from 'vue-router'
import index from '../views/index.vue'
import lyr_index from '../views/lyr_index.vue'
const routes = [
  {
    //基本格式
    path: "/",
    name: "index",
    component: index,
    children: []
  },
  {
    //基本格式
    path: "/lyr_index",
    name: "lyr_index",
    component: lyr_index,
    children: []
  },
]
  
//路由对象
const router = createRouter({
  history: createWebHashHistory(),
  routes //上面的路由数组
})

//导出路由对象，在main.js中引用
export default router